This repository was archived by the owner on Jun 18, 2024. It is now read-only.
Fixes autodiscover max redirection from multi-origin#541
Open
songyiyang wants to merge 2 commits intoOfficeDev:masterfrom
Open
Fixes autodiscover max redirection from multi-origin#541songyiyang wants to merge 2 commits intoOfficeDev:masterfrom
songyiyang wants to merge 2 commits intoOfficeDev:masterfrom
Conversation
added 2 commits
June 29, 2016 11:18
… redirected) being discovered, will reset the currentHop
Current coverage is 10.43%
|
Member
|
Please fix codecov check and provide unit-tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the first to-be-discovered url returning a response type of redirection, it will increase the currentHop until it reaches
AutodiscoverMaxRedirections, then if next to-be-discovered url (not from redirection) has a redirection url, the new redirection url will not get through the system since the current hop has reached max, this fix will make a copy from the original urls fromgetAutodiscoverServiceUrlsand check if the new to-be-discovered url is from this origin, then it will reset current hop if so.Aslo, changed the
urls.addmethod tourls.setfor not increasing the urls' list size with a lot of dummy urls ( e.g. if detecting a new redirect url, it will add the redirect target to current index and continue with the current index, however the old url will be shifted to next index so when the next index of url being discovered, it will do the same loop until hitting theAutodiscoverMaxRedirections), this will decrease the number of requests that fetching unnecessary urls and increase performance.